#include <sys/types.h>

#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int, char *[]);
void strrep(const char *, const char *);

void
strrep(const char *original, const char *replace)
{
   if (strlen(original) && strlen(replace)) {
      char *exist = strstr(original, replace);
      if (exist) 
         printf("%s exists within %s\n", replace, original);
   }
}
         
int
main(int argc, char *argv[])
{
   if (argc != 3)
      err(1, "not enough arguments!");
   else {
      char *original = argv[1];
      char *replace = argv[2];

      printf("original: %s, replace with: %s\n", original, replace);
      strrep(original, replace);
   }

   return 0;
}
